<!doctype html>
<html>
<head>
<title>管理菜单添加</title>
    <?php $this->load->module('admin/index/page_header');?>
</head>
<body>
<div class="wrap">
    <div id="home_toptip"></div>
    <div class="nav">
        <?php if($_GET['type'] =='wmp'){?>

			<ul>
				<li><a href="<?php echo site_url('weixin/admin/card')?>">微名片管理</a></li>
				<li class="current"><a href="<?php echo site_url('admin/adminuser/add?type=wmp');?>">添加微名片</a></li>
				<?php if(!in_array(SITEID, array(751))){?><li><a href="<?php echo site_url('weixin/admin/cardsetting');?>">微名片模板</a></li><?php }?>
			</ul>
		<?php }else{?>
			<ul>
				<?php if(!$_GET['type']){?><li><a href="<?php echo site_url('admin/adminuser/index')?>">管理员管理</a></li><?php }else{?>
					<li><a href="javascript:window.history.go(-1);">返回</a></li>
				<?php }?>
				<li class="current"><a href="<?php echo site_url('admin/adminuser/add')?>">添加<?php if(!$_GET['type']){?>管理员 <?php }else{?>微名片<?php }?></a></li>
			</ul>
		<?php }?>

    </div>
    <div class="table_full">
	    <form class="formvalidate" action="<?php echo $form_post;?>" method="post">
	    <div class="h_a">添加<?php if(!$_GET['type']){?>管理员 <?php }else{?>微名片<?php }?></div>
	    <div class="table_full">
	        <table width="100%">
	            <col class="th" />
                <col/>
	            <tbody>
				<?php if($wmp==1):?>
					<input type="hidden" name="Form[role_id]" value="<?php echo $daren['id']?>">
				<?else:?>
				<tr>
					<th>所属角色</th>
					<td>
						<select name="Form[role_id]" class="select rounded" style="font-family: 'Courier New', Courier, monospace;">
							<?php if(!empty($role_list)):?>
								<?php foreach($role_list as $val):?>
									<option value="<?php echo $val['id'];?>"><?php echo $val['name'];?></option>
								<?php endforeach;?>
							<?php endif;;?>
						</select>
					</td>
				</tr>
				<?php endif;?>

	            <tr>
	                <th>用户名</th>
	                <td><input type="text" name="Form[name]" class="input rounded" size="30" validate="{required:true,rangelength:[1,20],isNotMobile:true,isNotEmail:true,remote:'<?php echo $ajax_check_name;?>'}" /></td>
	            </tr>
	            <tr>
	                <th>密码</th>
	                <td><input id="u_password" type="password" name="Form[password]" class="input rounded" size="30" validate="{required:true,rangelength:[6,20],equalTo:'#u_password'}" /></td>
	            </tr>
	            <tr>
	                <th>重复密码</th>
	                <td><input type="password" name="confirm_password" class="input rounded" size="30" validate="{required:true,rangelength:[6,20],equalTo:'#u_password'}" /></td>
	            </tr>
                <tr>
	                <th>所属部门</th>
	                <td>
	                    <select name="Form[division_id]" class="select rounded" style="font-family: 'Courier New', Courier, monospace;">
                        <option value="-1">公司总部</option>
                        <?php echo $select_categorys;?>
                        </select>&nbsp;&nbsp;(如选择公司总部，表示拥有查看所有部门的业绩权限)
                    </td>
	            </tr>
<!--	            <tr>
	                <th>E-mail</th>
	                <td><input type="text" name="Form[email]" class="input rounded" size="30" validate="" /></td>
	            </tr>-->
	            <tr>
                    <th>手机号码</th>
                    <td><input type="text" name="Form[mobile]" class="input rounded" size="30" validate="{required:true,isMobile:true,remote:'<?php echo $ajax_check_mobile;?>'}" /></td>
                </tr>
	            <tr>
	                <th>备注</th>
	                <td><textarea name="Form[remark]" rows="5" cols="47"></textarea></td>
	            </tr>
	            <tr>
	                <th>状态</th>
	                <td>
	                    <label><input type="radio" value="1" name="Form[is_open]" checked="checked" />启用</label>
                        <label><input type="radio" value="0" name="Form[is_open]" />禁用</label>
                    </td>
	            </tr>
                <tr>
                    <th>是否可DIY</th>
                    <td>
                        <label><input type="radio" value="1" name="Form[is_diy]" checked="checked" />启用</label>
                        <label><input type="radio" value="0" name="Form[is_diy]" />禁用</label>
                    </td>
                </tr>
	            </tbody>
	        </table>
	    </div>
	    <div class="btn_wrap">
	        <div class="btn_wrap_pd">
	            <input type="hidden" name="id" value="0" />
	            <button type="submit" class="btn btn_submit J_ajax_submit_btn">提交</button>
	        </div>
	    </div>
	    </form>
    </div>
</div>
</body>
</html>